package com.example.wendao.model.entity;



import androidx.annotation.Nullable;
import androidx.databinding.BaseObservable;
import androidx.databinding.Bindable;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;

@Entity
public class News extends BaseObservable {

    @PrimaryKey(autoGenerate = true)    //新闻id（主键自增）
    private int newsId;

    private String newsTitle;

    private String newsContent;

    //作者id
    private int newsAuthorId;

    //发布时间（varchar）
    private String newsTime;

    //点赞数（int）
    private int newsAgree;

    //投币数（int）
    private int newsCoin;

    //收藏数（int）
    private int newsCollect;

    //点赞人id( 逗号隔开)
    private String newsAgreeId;

    //新闻类型（int）
    private int newsType;

    public News(){}

    @Ignore
    public News(int newsId, String newsTitle, String newsContent, int newsAuthorId, String newsTime, int newsAgree, int newsCoin, int newsCollect, String newsAgreeId) {
        this.newsId = newsId;
        this.newsTitle = newsTitle;
        this.newsContent = newsContent;
        this.newsAuthorId = newsAuthorId;
        this.newsTime = newsTime;
        this.newsAgree = newsAgree;
        this.newsCoin = newsCoin;
        this.newsCollect = newsCollect;
        this.newsAgreeId = newsAgreeId;
    }

    public int getNewsId() {
        return newsId;
    }

    public void setNewsId(int newsId) {
        this.newsId = newsId;

    }

    public String getNewsTitle() {
        return newsTitle;
    }

    public void setNewsTitle( String newsTitle) {
        this.newsTitle = newsTitle;
    }

    public String getNewsContent() {
        return newsContent;
    }

    public void setNewsContent( String newsContent) {
        this.newsContent = newsContent;
    }

    public int getNewsAuthorId() {
        return newsAuthorId;
    }

    public void setNewsAuthorId(int newsAuthorId) {
        this.newsAuthorId = newsAuthorId;
    }


    public String getNewsTime() {
        return newsTime;
    }

    public void setNewsTime( String newsTime) {
        this.newsTime = newsTime;
    }

    public int getNewsAgree() {
        return newsAgree;
    }

    public void setNewsAgree(int newsAgree) {
        this.newsAgree = newsAgree;
    }

    public int getNewsCoin() {
        return newsCoin;
    }

    public void setNewsCoin(int newsCoin) {
        this.newsCoin = newsCoin;
    }

    public int getNewsCollect() {
        return newsCollect;
    }

    public void setNewsCollect(int newsCollect) {
        this.newsCollect = newsCollect;
    }

    public String getNewsAgreeId() {
        return newsAgreeId;
    }

    public void setNewsAgreeId( String newsAgreeId) {
        this.newsAgreeId = newsAgreeId;
    }

    public int getNewsType() {
        return newsType;
    }

    public void setNewsType(int newsType) {
        this.newsType = newsType;
    }
    public boolean equals(@Nullable Object o) {
        return super.equals(o);
    }

}
